package com.itheima.myfile;

import java.io.File;
import java.io.IOException;

/**
 * @Author 王加鑫
 * @Date 2021/5/17 17:01
 * @Version 1.0
 */
public class FileTest3 {
    public static void main(String[] args) throws IOException {
        File file1 = new File("day12_file&字节流/abc");
        File file2 = new File(file1,"hello.txt");
        if(!file1.exists()){
            file1.mkdirs();
        }
        file2.createNewFile();

        System.out.println(file2.isDirectory());

        System.out.println(file2.getName());

        if(file2.exists()){
            file2.delete();
            if(file1.exists()){
                file1.delete();
            }
        }
    }
}
